package io;



import java.io.File;
import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author 徐志荣
 * @date 2023/3/28 19:56
 */
public class IODemo2 {
    public static void main(String[] args) throws IOException {

        File file = new File("./hello.txt");
        //是否存在?
        System.out.println(file.exists());
        System.out.println(file.isDirectory());
        System.out.println(file.isFile());
        //idea 工作目录 就是项目所在目录

        //创建文件
        file.createNewFile();

        System.out.println(file.exists());
        System.out.println(file.isDirectory());
        System.out.println(file.isFile());
        ConcurrentHashMap map = new ConcurrentHashMap<>();

        file.delete();
        System.out.println(file.exists());
    }
}
